package com.transaction.manage.localMapper;

import com.transaction.manage.model.dto.FundOpenDate;
import com.transaction.manage.model.vo.FundOpenDateVo;
import com.transaction.manage.myMapper.MyMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FundOpenDateMapper extends MyMapper<FundOpenDate> {

    List<FundOpenDate> selectFundOpenDates(FundOpenDate fundOpenDate);

    @Delete("DELETE FROM fund_open_date WHERE channel_code = #{channelCode} AND fund_code = #{fundCode} AND year = #{year} AND business_code = #{businessCode} ")
    void deleteFundOpenDate(FundOpenDateVo fundOpenDateVo);

    void insertFundOpenDates(FundOpenDateVo fundOpenDateVo);

    int checkDayIsCarryOverDay(@Param("marketCode") String marketCode,
                               @Param("handleDate") String handleDate,
                               @Param("day") String day,
                               @Param("containsMonth") String containsMonth);
}